package mr

import "time"

type TaskType string
type TaskStatus string

const (
	TaskTimeOut time.Duration = 10 * time.Second
)
const (
	MapTask    TaskType = "map"
	ReduceTask TaskType = "reduce"
)

const (
	Pending   TaskStatus = "Task等待中"
	Active    TaskStatus = "Task进行中"
	Completed TaskStatus = "Task已完成"
)

type Task struct {
	FileName       string
	TaskID         int      // 唯一标识符
	TaskType       TaskType // "map" 或 "reduce"
	ReduceNum      int      // Reduce的数量，任何任务都要用到
	Status         TaskStatus
	StartTime      time.Time
	InputFilePath  string // 对于Map任务，这是输入文件路径；对于Reduce任务，这可能是中间数据位置
	OutputFilePath string // 输出文件路径
}
